// Fill out your copyright notice in the Description page of Project Settings.


#include "SoulGameplay/Player/SKPlayerPaperCharacter.h"

#include "PaperFlipbookComponent.h"
#include "Camera/CameraComponent.h"
#include "Components/CapsuleComponent.h"
#include "GameFramework/SpringArmComponent.h"

ASKPlayerPaperCharacter::ASKPlayerPaperCharacter()
{
	SpringArmComp = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArmComponent"));
	CameraComp = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
	CameraComp->ProjectionMode = ECameraProjectionMode::Orthographic;
	CameraComp->OrthoWidth = 400.f;
	CameraComp->SetupAttachment(SpringArmComp, SpringArmComp->SocketName);

	SpringArmComp->SetWorldRotation(FRotator(-90.f, -90.f, 0.f));
	SpringArmComp->bDoCollisionTest = false;
	SpringArmComp->SetupAttachment(RootComponent);

	GetCapsuleComponent()->SetCapsuleRadius(13.f);
	GetCapsuleComponent()->SetCapsuleHalfHeight(13.f);
	
	GetSprite()->SetRelativeLocation(FVector(0.f, 13.f, -1.f));
	GetSprite()->SetRelativeRotation(FRotator(0.f, 0.f, -90.f));
}
